<template>
  <div>
    <el-form :model="form" label-width="100">
      <el-form-item label="单号:" style="width: 100%">
        <p>{{ form.inoutCode }}</p>
      </el-form-item>
      <el-form-item label="部门:">
        <p>{{ form.departmentName }}</p>
      </el-form-item>
      <el-form-item :label="form.type == 1 ? '领用人:' : '盘点人:'">
        <p>{{ form.userName }}</p>
      </el-form-item>
      <el-form-item label="仓库:">
        <p>{{ form.warehouseName }}</p>
      </el-form-item>
      <el-form-item label="经办人:">
        <p>{{ form.operatorName }}</p>
      </el-form-item>
      <el-form-item label="物品列表:" style="width: 100%">
        <el-table
          ref="table"
          row-key="id"
          :data="form.inoutProductList"
          border
          :header-cell-style="{ background: '#f5f7fa' }"
        >
          <!-- <el-table-column
            label="领用人"
            prop="adminName"
            width="200"
          ></el-table-column>
          <el-table-column
            label="部门"
            prop="departmentName"
            width="200"
          ></el-table-column> -->
          <el-table-column label="物品名称" prop="productSpuName">
          </el-table-column>
          <el-table-column label="规格" prop="specificationName">
          </el-table-column>
          <el-table-column label="预计入库" prop="inoutNum"> </el-table-column>
          <el-table-column label="实际入库" prop="actualNum">
            <template #default="scope">
              <el-input
                v-model="scope.row.actualNum"
                clearable
                placeholder="请输入实际入库数量"
                v-if="$route.query.mode == 'edit'"
              ></el-input>
              <p v-else>{{ scope.row.actualNum }}</p>
            </template>
          </el-table-column>
          <el-table-column label="单位" prop="unitName"></el-table-column>
        </el-table>
      </el-form-item>
      <el-form-item label="入库日期:">
        <p>{{ form.inoutTime }}</p>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  name: 'detail',
  data () {
    return {
      form: {},
      dataList: []

    }
  },
  props: {
    list: {
      type: Array,
      required: true
    }
  },
  watch: {
    list (val) {
      if (val) {
        console.log(val)
        this.form = val[0]
      }
    }
  }


}
</script>
<style  >
</style>